package com.stox.core.ui.swing.widget;

import java.awt.BorderLayout;
import java.awt.Dimension;

import com.stox.core.ui.swing.util.JLabelTextSetter;
import com.stox.core.ui.swing.wrapper.JLabel;
import com.stox.core.ui.swing.wrapper.JPanel;

public class MessagePanel extends JPanel {
	private static final long serialVersionUID = -3660155525657073995L;

	private JLabel messageLabel = new JLabel();
	private Dimension size = new Dimension(0, 20);
	
	public MessagePanel() {
		add(messageLabel, BorderLayout.CENTER);
	}
	
	public void setMessage(String message){
		JLabelTextSetter.setText(messageLabel, message);
	}
	
	@Override
	public Dimension getPreferredSize() {
		return size;
	}
	
}
